package com.servicesManagement.model;
// Generated Dec 13, 2014 11:53:18 AM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * Aspect generated by hbm2java
 */
@Entity
@Table(name="ASPECT"
    ,schema="SANKAR"
)
public class Aspect  implements java.io.Serializable {


     private Long aspectId;
     private AspectDataType aspectDataType;
     private BigDecimal changedByUserId;
     private Date changedDate;
     private BigDecimal createdByUserId;
     private Date createdDate;
     private String description;
     private String mask;
     private String name;
     @JsonIgnore
     private Set<AspectConf> aspectConfs = new HashSet<AspectConf>(0);

    public Aspect() {
    }

	
    public Aspect(Long aspectId) {
        this.aspectId = aspectId;
    }
    public Aspect(Long aspectId, AspectDataType aspectDataType, BigDecimal changedByUserId, Date changedDate, BigDecimal createdByUserId, Date createdDate, String description, String mask, String name, Set aspectConfs) {
       this.aspectId = aspectId;
       this.aspectDataType = aspectDataType;
       this.changedByUserId = changedByUserId;
       this.changedDate = changedDate;
       this.createdByUserId = createdByUserId;
       this.createdDate = createdDate;
       this.description = description;
       this.mask = mask;
       this.name = name;
       this.aspectConfs = aspectConfs;
    }
   
     @Id 
    @GeneratedValue(strategy= GenerationType.AUTO)
    @Column(name="ASPECT_ID", unique=true, nullable=false, scale=0)
    public Long getAspectId() {
        return this.aspectId;
    }
    
    public void setAspectId(Long aspectId) {
        this.aspectId = aspectId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="DATA_TYPE_ID")
    public AspectDataType getAspectDataType() {
        return this.aspectDataType;
    }
    
    public void setAspectDataType(AspectDataType aspectDataType) {
        this.aspectDataType = aspectDataType;
    }
    
    @Column(name="CHANGED_BY_USER_ID")
    public BigDecimal getChangedByUserId() {
        return this.changedByUserId;
    }
    
    public void setChangedByUserId(BigDecimal changedByUserId) {
        this.changedByUserId = changedByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CHANGED_DATE", length=7)
    public Date getChangedDate() {
        return this.changedDate;
    }
    
    public void setChangedDate(Date changedDate) {
        this.changedDate = changedDate;
    }
    
    @Column(name="CREATED_BY_USER_ID")
    public BigDecimal getCreatedByUserId() {
        return this.createdByUserId;
    }
    
    public void setCreatedByUserId(BigDecimal createdByUserId) {
        this.createdByUserId = createdByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CREATED_DATE", length=7)
    public Date getCreatedDate() {
        return this.createdDate;
    }
    
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    
    @Column(name="DESCRIPTION")
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    @Column(name="MASK")
    public String getMask() {
        return this.mask;
    }
    
    public void setMask(String mask) {
        this.mask = mask;
    }
    
    @Column(name="NAME")
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
@OneToMany(fetch=FetchType.LAZY, mappedBy="aspect", cascade={javax.persistence.CascadeType.ALL})

    public Set<AspectConf> getAspectConfs() {
        return this.aspectConfs;
    }
    
    public void setAspectConfs(Set<AspectConf> aspectConfs) {
        this.aspectConfs = aspectConfs;
    }

    @Override
    public String toString() {
        return "Aspect{" + "aspectId=" + aspectId + ", aspectDataType=" + aspectDataType + ", description=" + description + ", name=" + name + '}';
    }




}


